h1(ng-if="tasks.tasks.length") Tasks
	small(ng-if="status.length > 0" ng-bind="status")

table.table.table-hover(ng-if="tasks.tasks.length")
	thead
		tr
			th Job Name
			th Play File
			th Status
			th &nbsp;
	tbody
		tr(ng-repeat="task in tasks.tasks")
			td {{ task.data.job.name }}
			td {{ task.data.job.play_file }}
			td
				i.fa.fa-fw.fa-spin.fa-cog(ng-if="task.data.status == 'Running'")
				i.fa.fa-fw.fa-check(ng-if="task.data.status == 'Completed'")
				i.fa.fa-fw.fa-times(ng-if="task.data.status == 'Failed'")
				|  {{ task.data.status }}
			td
				.btn-group.pull-right
					button.btn.btn-default.btn-xs(ng-click="openOutput(task)" ng-if="task.data.status != 'Queued'")
						i.fa.fa-fw.fa-file-code-o
						|  See Output
					button.btn.btn-danger.btn-xs(ng-click="removeTask(task)" ng-if="task.data.status != 'Running'")
						i.fa.fa-fw.fa-times
						|  Remove Task

#taskOutput.modal.fade
	.modal-dialog.modal-lg
		.modal-content
			.modal-header
				button(data-dismiss="modal").close: span &times;
				h4.modal-title Task Output
			.modal-body
				pre: code {{ openTask.data.output }}

h4.text-center.text-muted(ng-if="!tasks.tasks.length" style="margin-top: 15px;") It seems no&nbsp;
	a(ui-sref="playbook.jobs") jobs
	| &nbsp;have been run yet.